package com.ziiwee.reduce.describe.models;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import org.springframework.core.ResolvableType;

import java.io.IOException;

public class ResolvableTypeSerializer extends JsonSerializer<ResolvableType> {
    @Override
    public void serialize(ResolvableType type, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        jsonGenerator.writeString(type.toString());
    }
}
